local skill = fk.CreateSkill{
  name = "iberia__viewas"
}

Fk:loadTranslationTable{
  [skill.name] = "骁果",
}

local choices = {"slash", "method_discard"}

skill:addEffect("active", {
  interaction = function (self, player)
    return UI.ComboBox { choices = choices }
  end,
  card_num = 2,
  card_filter = function (self, player, to_select, selected)
    return #selected < 2 and Fk:currentRoom():getCardArea(to_select) == Card.PlayerHand
  end,
  target_num = function (self)
    return 2 - table.indexOf(choices, self.interaction.data)
  end,
  target_filter = function (self, player, to_select, selected, selected_cards)
    if #selected < (2 - table.indexOf(choices, self.interaction.data)) and self.to == to_select.id then
      local slash = Fk:cloneCard("slash")
      slash.skillName = "iberia__xiaoguo"
      slash:addSubcards(selected_cards)
      return slash.skill:modTargetFilter(player, to_select, {}, slash, {extraUse = true})
    end
  end,
})

return skill
